/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * SellerForm.java
 *
 * Created on 07/12/2009, 22:48:44
 */

package sigbar.view;

/**
 *
 * @author Denis
 */
public class SellerForm extends javax.swing.JPanel {

    SellerCliente CadCliente;
    SellerProcCliente ProcCliente;
    SellerProcVenda ProcVenda;
    SellerVisEstoq VisualEstoq;

    /** Creates new form SellerForm */
    public SellerForm() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonCadCliente = new javax.swing.JButton();
        buttonProcCliente = new javax.swing.JButton();
        buttonProcVenda = new javax.swing.JButton();
        buttonEstoq = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jLabel1 = new javax.swing.JLabel();

        buttonCadCliente.setText("Cadastrar Cliente");
        buttonCadCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonCadClienteActionPerformed(evt);
            }
        });

        buttonProcCliente.setText("Procurar Cliente");
        buttonProcCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonProcClienteActionPerformed(evt);
            }
        });

        buttonProcVenda.setText("Processar Venda");
        buttonProcVenda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonProcVendaActionPerformed(evt);
            }
        });

        buttonEstoq.setText("Visualizar Estoque");
        buttonEstoq.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonEstoqActionPerformed(evt);
            }
        });

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Nome do Produto", "Transações", "Valor (Unidade)"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel1.setText("Histórico do Dia");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(buttonCadCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE)
                    .addComponent(buttonProcCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE)
                    .addComponent(buttonProcVenda, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE)
                    .addComponent(buttonEstoq, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(buttonCadCliente)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(buttonProcCliente)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(buttonProcVenda)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(buttonEstoq))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void buttonCadClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCadClienteActionPerformed
        CadCliente = new SellerCliente(null,true);
        CadCliente.setVisible(true);
}//GEN-LAST:event_buttonCadClienteActionPerformed

    private void buttonProcClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonProcClienteActionPerformed
        ProcCliente = new SellerProcCliente(null,true);
        ProcCliente.setVisible(true);
}//GEN-LAST:event_buttonProcClienteActionPerformed

    private void buttonProcVendaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonProcVendaActionPerformed
        ProcVenda = new SellerProcVenda(null,true);
        ProcVenda.setVisible(true);
}//GEN-LAST:event_buttonProcVendaActionPerformed

    private void buttonEstoqActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonEstoqActionPerformed
        VisualEstoq = new SellerVisEstoq(null,true);
        VisualEstoq.setVisible(true);
}//GEN-LAST:event_buttonEstoqActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton buttonCadCliente;
    private javax.swing.JButton buttonEstoq;
    private javax.swing.JButton buttonProcCliente;
    private javax.swing.JButton buttonProcVenda;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    // End of variables declaration//GEN-END:variables

}
